﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PSE.Framework.ErrorLogging;
using PSE.Framework.Configuration;

namespace PSE.Framework.Process
{
    public abstract class AppDomainObject : MarshalByRefObject
    {
        public AppDomainObject()
        {
            ApplicationConfiguration.Initialize(GetSystem(), GetComponent());
        }

        public AppDomainObject(SystemComponent system, SystemComponent component)
        {
            ApplicationConfiguration.Initialize(system, component);
        }

        protected virtual SystemComponent GetComponent()
        {
            return ApplicationConfiguration.CurrentComponent;
        }

        protected virtual SystemComponent GetSystem()
        {
            return ApplicationConfiguration.CurrentSystem;
        }

        public override object InitializeLifetimeService()
        {
            return null;
        }
    }
}
